package com.d0312;

public class Anony {
    private String name = "jj";
    private int age = 24;
//    House house = new House() {
//        @Override
//        public void show() {
//
//        }
//    };

//    IFoo foo = () -> System.out.println("hello");
//    IFoo foo = () -> 5;
//    IFoo foo = (x,y) ->x+y;
    IFoo foo = (String s) -> System.out.println(s+"\t"+name);

    public static void main(String[] args) {
        Anony al = new Anony();
        al.foo.showStr("word");
    }
}

@FunctionalInterface
interface IFoo{
//    public void display();
//    int getResult();
//    int get2Result(int a);
//    int sum(int a,int b);
    void showStr(String str);
}

abstract class House{
    public abstract void show();
}